-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Red 1953 pagination #513
Red 1953 pagination #513
Conversation
2a1362f
to
f50ff46
Compare
ea8e02c
to
a1af75a
Compare
a1af75a
to
0842d6f
Compare
{ | ||
return new TicketsIterator($this); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved into trait to make it generic to all resources.
0da9b00
to
c4bd841
Compare
|
||
private function paginationStrategyClass() { | ||
return ObpStrategy::class; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const are not available in traits in the current PHP version (7.4)
c4bd841
to
3856a8e
Compare
|
||
private function paginationStrategyClass() { | ||
return CbpStrategy::class; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will act as default
3856a8e
to
7ff5420
Compare
7ff5420
to
5994a59
Compare
4578878
to
4af18e5
Compare
8b96def
to
2cca4bb
Compare
2cca4bb
to
48ac3f6
Compare
@@ -8,6 +8,9 @@ services: | |||
- .:/app | |||
- vendor:/app/vendor | |||
command: vendor/bin/phpunit --testsuite "Zendesk API Unit Test Suites" | |||
# command: vendor/bin/phpunit tests/Zendesk/API/UnitTests/Traits/Utility/PaginationTest.php | |||
# command: vendor/bin/phpunit tests/Zendesk/API/UnitTests/Core/TicketsTest.php | |||
# command: vendor/bin/phpunit tests/Zendesk/API/UnitTests/Core/OrganizationMembershipsTest.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do some cleaning at the end, but these comments come useful to switch between tests.
Implement the solution that works with all types of pagination (obp / cbp / single page). Defaults to CBP.
** Update: I extracted the iterator in its own trait.